#include "PropertyIndexerNode.h"

#include "Output/Console.h"

#include "ScriptCompiler/AST/ParameterNode.h"


void CPropertyIndexerNode::DebugPrint(int32_t InDepth)
{
    //print depth
    for(int32_t i = 0; i < InDepth; ++i)
    {
        WH::Print(U"\t");
    }

    WH::Print(U"[");

    //print parameters
    for(uint32_t i = 0; i < Parameters.Num(); ++i)
    {
        Parameters[i]->DebugPrint(0);

        if(i != Parameters.Num() - 1)
        {
            WH::Print(U",");
        }
    }

    WH::Print(U"]");

}

std::shared_ptr<CScriptToken> CPropertyIndexerNode::GetFirstToken()
{
    return LeftBracket;
}